package com.atzly.community.mapper;

import com.atzly.community.entity.Comment;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author zlysimida
 * @date 2021/8/28 - 16:59
 */
@Mapper
public interface CommentMapper {


    List<Comment> getCommentAndPage(int entityType, int entityId, int offset, int limit);

    int getComment(int entityType, int entityId);

    int saveComment(Comment comment);

    Comment selectCommentById(int entityId);

    Integer getCommentNumsByUserId(int userId, int entityTypePost, int entityTypeComment);

    List<Comment> getCommentByUserPage(int userId, int entityTypePost, int entityTypeComment,int offset,int limit);
}

